/**
 * 
 */
package com.placement.app.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.placement.app.model.JobData;

/**
 * @author Siddharth
 * 
 */
public class SearchDisplayAction extends BaseAction {
	private static final Log logger = LogFactory
			.getLog(SearchDisplayAction.class);

	public ActionForward load(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		String forward = null;

		if (forward == null) {
			long startTime = System.currentTimeMillis();
			forward = "display";
			List<JobData> jobList = (List<JobData>)request.getSession().getAttribute("JOB_RESULT");
			request.getSession().removeAttribute("JOB_RESULT");

			logger.debug(this.getClass().getName()+	" load "+ (System.currentTimeMillis() - startTime) + " ms");
			
		}
		return mapping.findForward(forward);
	}

}
